package com.healthcloud.dao;

import com.healthcloud.dto.res.PatientInstrumentDto;
import com.healthcloud.entity.InstrumentInfoEntity;
import com.healthcloud.utils.PageParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface InstrumentInfoMapper extends CRUDMapper<InstrumentInfoEntity, Long> {

	InstrumentInfoEntity getBySn(String sn);

    Integer totalByHospitalIds(@Param("ids") String ids);

    List<String> listTotalByHospitalIds(@Param("ids") String ids);

    Integer useTotalByHospitalIds(@Param("ids")String ids, @Param("day")int day);

    List<String> listUseTotalByHospitalIds(@Param("ids")String ids, @Param("day")int day);

    Integer useTimesByHospitalIds(@Param("ids")String ids, @Param("day")int day);

    List<String>  listUseTimesByHospitalIds(@Param("ids")String ids, @Param("day")int day);

    List<PatientInstrumentDto> listInfosBySns(@Param("snList") List<String> snList);

    List<PatientInstrumentDto> pageForInfosBySns(@Param("snList") List<String> unUseSnList, @Param("pageParam") PageParam pageParam);

}